package com.zhixue.exception;

/**
 * @Auther: 李 力
 * @Date: 2025/4/8
 * @Description: com.zhixue.exception
 * @version: 1.0
 */
public class ZhixuePlusException extends RuntimeException {
    private String errMessage;

    public ZhixuePlusException() {
        super();
    }

    public ZhixuePlusException(String errMessage) {
        super(errMessage);
        this.errMessage = errMessage;
    }

    public String getErrMessage() {
        return errMessage;
    }

    public static void cast(CommonError commonError) {
        throw new ZhixuePlusException(commonError.getErrMessage());
    }

    public static void cast(String errMessage) {
        throw new ZhixuePlusException(errMessage);
    }
}
